import React from 'react';
import { useSelector, useDispatch } from 'react-redux';
import { increment, decrement } from '../store/counterSlice';
import type { RootState } from '../store';
export default function Home() {
   const count = useSelector((s: RootState) => s.counter.value);
  const dispatch = useDispatch();
  return (
    <div style={{ padding: 40 }}>
      <h1>Electron + React + Redux(RTK)</h1>
      <p>count = {count}</p>
      <button onClick={() => dispatch(increment())}>+1</button>
      <button onClick={() => dispatch(decrement())}>-1</button>
    </div>
  );
}